<form gnForm [formGroup]="form.formGroup">
  <gn-form-field title="输入一" field="required"
                 [validators]="[{message: '必须输入', name: 'required', validatorFn: form.validators.required}]">
    <input formControlName="required" type="text" pInputText>
  </gn-form-field>
  <gn-form-field title="输入二" field="confirm"
                 [validators]="[{message: '必须输入', name: 'confirm', validatorFn: form.validators.equals(form.formGroup.controls['required'])}]">
    <input formControlName="confirm" type="text" pInputText>
  </gn-form-field>
</form>
<hr>
{{form.formGroup.value|json}}
{{form.formGroup.invalid}}
